<?php
if (count($argv) == 1) {
    print('Usage php ' . $argv[0] . ' xml_file');
    exit();
}

$xml_file = $argv[1];

if (!is_file($xml_file)) {
    print('File not exists: ' . $argv[1]);
    exit();
}

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://localhost/suifeng-tp-admin/wechat.php');
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, file_get_contents($xml_file));
curl_exec($curl);
curl_close($curl);
